<html>
<head><meta charset="utf-8"><title>Why needs ast_src.rs? · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Why.20needs.20ast_src.2Ers.3F.html">Why needs ast_src.rs?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="222595728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Why%20needs%20ast_src.rs%3F/near/222595728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> sasurau4 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Why.20needs.20ast_src.2Ers.3F.html#222595728">(Jan 13 2021 at 15:19)</a>:</h4>
<p>In my curious, why we need <code>xtask/src/ast_src.rs</code>? It seems that we could generate syntax from ungrammar without this file.</p>



<a name="222597611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Why%20needs%20ast_src.rs%3F/near/222597611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Why.20needs.20ast_src.2Ers.3F.html#222597611">(Jan 13 2021 at 15:30)</a>:</h4>
<p>Some of the things there could in theory  also be generated I believe like keywords or node names, but for the majority that file is required to give things names that the grammar doesnt express. For example giving punctuations names. Then there is also the difference between keywords, contextual keywords and literals which ungrammar cannot express either .</p>



<a name="222705005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Why%20needs%20ast_src.rs%3F/near/222705005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> sasurau4 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Why.20needs.20ast_src.2Ers.3F.html#222705005">(Jan 14 2021 at 11:19)</a>:</h4>
<p>I see. Thanks!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>